<%-- 
    Document   : editar
    Created on : 28/05/2010, 04:40:37 PM
    Author     : Damc
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
   "http://www.w3.org/TR/html4/loose.dtd">
<%
    HttpSession sesion = request.getSession();
    try{
        if(!sesion.getAttribute("role").equals("client") || sesion == null){
            sesion.invalidate();
            response.sendRedirect("../index.jsp");
        }
    }catch(Exception w){ response.sendRedirect("../index.jsp");
    }
    String username =(String) sesion.getAttribute("username");
    String error = (String)request.getAttribute("error");
    if (error == null){error = "";}
    String nombre = (String)request.getAttribute("nombre");
    if (nombre == null){response.sendRedirect("index.jsp");}
    String apellido = (String)request.getAttribute("apellido");
    String mail = (String)request.getAttribute("mail");
    String tell = (String)request.getAttribute("tell");
    String creditcard = (String)request.getAttribute("creditcard");
    if (tell == null){response.sendRedirect("index.jsp");}
%>

<html>
    <head>
        <title>FuTurismo - Haga sus reservas de forma facil y rapida</title>
        
        <link href="../css/styles.css" rel="stylesheet" type="text/css" />
        <script src="../js/Encriptacion.js" type="text/javascript"></script>>
        <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    </head>


    <jsp:include page="../fragment/top.jsp"/>
    <center>
        <jsp:include page="../fragment/subtopclient.jsp"/>
        <div id="fond" class="clear-block">
            <table><tbody><tr><td>
                    <jsp:include page="../fragment/leftClient.jsp"/>

                <!columna dos para la parte central de la pagina>

                    <div id="central" class="clear-block">
                        <div align="center">
                        <h1>Edite su informacion personal</h1>
                        <p>Los campos conn * son obligatorios</p>
                        <p>Para que los campos tengan efecto debe poner su contraseña</p>
                        </div>
                        <form name="edicion" method="post" action="manejoUsuarios" onsubmit="document.edicion.pass0.value = hex_md5(document.edicion.pas0.value);document.edicion.pass1.value = hex_md5(document.edicion.pas1.value);document.edicion.pass2.value = hex_md5(document.edicion.pas2.value);">
                            <input type="hidden" name="request" value="editar">
                            <div align="center">
                                <table align="center">
                                    <tbody>
                                        <tr>
                                            <td>*Nombre:</td>
                                            <td><input name="nombre" type="text" maxlength="45" value="<%=nombre%>"></td>
                                        </tr>
                                        <tr>
                                            <td>*Apellido:</td>
                                            <td><input name="apellido" type="text" maxlength="45" value="<%=apellido%>"></td>
                                        </tr>
                                        <tr>
                                            <td>*E-mail:</td>
                                            <td><input name="mail" type="text" maxlength="45" value="<%=mail%>"></td>
                                        </tr>
                                        <tr>
                                            <td>*Telefono:</td>
                                            <td><input name="tell" type="text" maxlength="45" value="<%=tell%>"></td>
                                        </tr>
                                        <tr>
                                            <td>*Tarjeta de credito:</td>
                                            <td><input name="creditcard" type="text" maxlength="45" value="<%=creditcard%>"></td>
                                        </tr>
                                        <tr>
                                            <td>*Anterior Contraseña:</td>
                                            <td>
                                                <input type="hidden" name="pass0" value="">
                                                <input name="pas0" type="password" maxlength="45" value="">
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>*Si no quiere cambiar de contraseña deje en blanco los siguientes campos</td>
                                        </tr>
                                        <tr>
                                            <td>*Nueva Contraseña</td>
                                            <td>
                                                <input type="hidden" name="pass1" value="">
                                                <input name="pas1" type="password" maxlength="45" value="">
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>*Repita la nueva contraseña:</td>
                                            <td>
                                                <input type="hidden" name="pass2" value="">
                                                <input name="pas2" type="password" maxlength="45" value="">
                                            </td>
                                        </tr>
                                    </tbody>
                                </table>
                                <br>
                                <input name="boton" type="submit" value="editar" align="center">
                                <br>
                                <%=error%>
                            </div>
                        </form>

                    </div>
        </td> </tr> </tbody> </table>
                </div>
        <jsp:include page="../fragment/down.jsp"/>




    </center>
</html>